package org.snail.attendence.service;

import org.snail.attendence.bean.AbAttendenceMongo;
import org.snail.attendence.bean.AbnormalAttendanceDTO;
import org.snail.base.AttendenceCondition;
import org.snail.attendence.bean.AliWorkDTO;
import org.snail.attendence.bean.AttendenceMongo;
import org.snail.exception.CommonException;
import org.snail.exception.EmpException;

import java.util.List;

public interface AttendenceMongoService {

    /**
     * 保存考勤对象到mongoDB中
     * @param mongoObject
     * @param mongoName
     * @return
     * @throws CommonException
     */
     public int saveAttendenceMongo(Object mongoObject,String mongoName) throws CommonException;
    /**
     * 保存考勤列表到mongoDB中
     * @param mongoObject
     * @param mongoDBName
     * @return
     * @throws CommonException
     */
     public int saveAttendenceList(List<AliWorkDTO> mongoObject, String mongoDBName) throws CommonException;


     List<AbAttendenceMongo> findAliListByCondition(AttendenceCondition aliCondition) throws CommonException;  //多条件查询
     void editNormal(AbnormalAttendanceDTO abnormalAttendanceDTO) throws CommonException;     //强行将某条数据改为正常



//==================================================华丽丽的分割线=======================================
//     void reEditNormal(List<AbnormalAttendanceDTO> abnormalAttendanceDTOs);

     List<AbnormalAttendanceDTO> findAbnornalList(AttendenceCondition aliCondition) throws EmpException;   //多条件查询异常考勤数据

     List<AbnormalAttendanceDTO> findListByFlag(Integer isCorrect);    //找出强行标记异常的值
     List<AttendenceMongo> findListContainsApproval(AliWorkDTO aliWorkDTO);    //查找出有请假的list
//     void addAttendeceList(List<T> attendenceMongoList) throws CommonException;
     List<AliWorkDTO> findAll();    //查询所有
     void addOrUpDateAttendence(List<AliWorkDTO> aliWorkDTOS);    //查询所有

     Integer dropCollection(String collectionName);
     void updateCorrect(List<AbnormalAttendanceDTO> abnormalAttendanceDTOS);



     }
